package com.atguigu.spzx.manager.config;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Data
@ConfigurationProperties(prefix = "spzx.minio")
@Configuration
public class SpzxMinioConfig{

    private String url;//: http://192.168.1.170:9001
    private String bucket;//: spzx
    private String accessKey;//: admin
    private String secretKey;//: admin123456
    public static String URL;//: http://192.168.1.170:9001
    public static String BUCKET;//: spzx
    public static String ACCESS_KEY;//: admin
    public static String SECRET_KEY;//: admin123456
    //PostConstruct 是jdk原生注解  它标注的方法会在当前类的构造器调用后执行
    @PostConstruct
    public void init(){
        URL = this.url;
        BUCKET = this.bucket;
        ACCESS_KEY = this.accessKey;
        SECRET_KEY = this.secretKey;
    }

}
